﻿@using Microsoft.AspNetCore.Mvc.Localization;
@inject IViewLocalizer Localizer
@using LView.CMS.Models;
@using LView.CMS.Core;
@model List<LMyTask>;
@{
    ViewData["Title"] = Localizer["TimeLine"];
}

<ul class="layui-timeline">
    @foreach (var item in Model)
    {
        var task = MongodbHelper.Instance.FindEntity<LTask>(x => x.Id == item.TaskId);
        <li class="layui-timeline-item">
            <i class="layui-icon layui-timeline-axis">&#xe63f;</i>
            <div class="layui-timeline-content layui-text">
                <h3 class="layui-timeline-title">@item.AssignDate</h3>
                <p>
                    @task.Name -- @task.Description     @if (item.Percent == 100)
                    {<i class="layui-red">@Localizer["Complete"]</i>}
                else
                {<i class="layui-red">@Localizer["Running"]</i>}
                </p>
            </div>
        </li>
    }
    <li class="layui-timeline-item">
        <i class="layui-icon layui-timeline-axis">&#xe63f;</i>
        <div class="layui-timeline-content layui-text">
            <div class="layui-timeline-title">@Localizer["Past"]</div>
        </div>
    </li>
</ul>
